<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="core" %>
<%@ taglib prefix="fmt" uri="fmt" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html lang="en">
	<head>
		<title></title>
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />

		<!-- basic styles -->

		<link href="<%=path%>/page/back/assets/css/bootstrap.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="<%=path%>/page/back/assets/css/font-awesome.min.css" />

		<!--[if IE 7]>
		  <link rel="stylesheet" href="<%=path%>/page/back/assets/css/font-awesome-ie7.min.css" />
		<![endif]-->

		<!-- page specific plugin styles -->

		<!-- fonts -->

		<link rel="stylesheet" href="<%=path%>/page/back/assets/css/ace.min.css" />
		<link rel="stylesheet" href="<%=path%>/page/back/assets/css/ace-rtl.min.css" />
		<link rel="stylesheet" href="<%=path%>/page/back/assets/css/ace-skins.min.css" />

		<!--[if lte IE 8]>
		  <link rel="stylesheet" href="<%=path%>/page/back/assets/css/ace-ie.min.css" />
		<![endif]-->

		<!-- inline styles related to this page -->

		<!-- ace settings handler -->

		<script src="<%=path%>/page/back/assets/js/ace-extra.min.js"></script>

		<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->

		<!--[if lt IE 9]>
		<script src="<%=path%>/page/back/assets/js/html5shiv.js"></script>
		<script src="<%=path%>/page/back/assets/js/respond.min.js"></script>
		<![endif]-->
	</head>

	<body style="background:#fff;">
		<div class="col-xs-12">
			<div class="row">
				<div class="col-xs-12">
					<!-- PAGE CONTENT BEGINS --><br/>

					<div class="row">
						<div class="col-xs-12">
							<div class="table-responsive"><c:if test="${leng!=0}">
								<table class="table table-striped table-bordered table-hover">
									<thead>
										<tr>
											<th> 编号 </th>
											<th> 版主 </th>
											<th> 内容 </th>
											<th> 时间 </th>
											<th> 状态 </th>
											<c:if test="${key!=5}">
											<th> 发布 </th>
											</c:if>
											<c:if test="${key!=4}">
											<th> 不发布 </th>
											</c:if>
										</tr>
									</thead>

									<tbody>
										<c:forEach items="${pages.list}" var="all">
											<tr>
												<td class="center"> <b>${all.drId}</b> </td>
												<td>
													<a href="../user/see/${all.users.uId}.html"><c:if test="${all.users.uName==null}">该用户已注销</c:if>${all.users.uName}</a>
												</td>
												<td>
													<a href="see/${all.drId}.html">
														<span class="label label-sm label-warning arrowed arrowed-righ">
															详细内容
														</span>
													</a>
												</td>
												<td><fmt:formatDate value="${all.drTime}" pattern="yyyy-MM-dd HH:mm:ss" /></td>
												<td>
													<c:if test="${all.drType==3}">未处理</c:if>
													<c:if test="${all.drType==5}">已发布</c:if>
													<c:if test="${all.drType==4}">未发布</c:if>
												</td>
												<c:if test="${key!=5}">
												<td><a href="../diser/fabu/${all.drId}.html">发布</a></td>
												</c:if>
												<c:if test="${key!=4}">
												<td><a href="../diser/fbNo/${all.drId}.html">不发布</a></td>
												</c:if>
											</tr>
										</c:forEach>
									</tbody>
								</table>
								</c:if><c:if test="${leng==0}">暂无需处理的任务</c:if>
								
							</div>
								<c:if test="${leng!=0}">
							<div>
								<ul class="nav navbar-nav">
				                	<li><a href="list.html">首页</a></li>
				                	<c:if test="${pages.pageNum>1}">
				                		<li><a href="list.html?p=${pages.pageNum-1}">上一页</a></li>
				                	</c:if>
				                	<c:if test="${pages.pageNum<pages.pageCount}">
				                		<li><a href="list.html?p=${pages.pageNum+1}">下一页</a></li>
				                	</c:if>
				                	<li><a href="list.html?p=${pages.pageCount}">尾页</a></li>
				                </ul>
							</div></c:if>
						</div><!-- /.row -->
					</div><!-- /.page-content -->
				</div><!-- /.main-content -->
			</div><!-- /.main-container-inner -->
		</div><!-- /.main-container -->

		<!-- basic scripts -->

		<!--[if !IE]> -->

		<script src="<%=path%>/page/back/assets/js/jquery-2.0.3.min.js"></script>

		<!-- <![endif]-->

		<!--[if IE]>
		<script src="<%=path%>/page/back/assets/js/jquery-1.10.2.min.js"></script>
		<![endif]-->

		<!--[if !IE]> -->

		<script type="text/javascript">
			window.jQuery || document.write("<script src='<%=path%>/page/back/assets/js/jquery-2.0.3.min.js'>"+"<"+"/script>");
		</script>

		<!-- <![endif]-->

		<!--[if IE]>
		<script type="text/javascript">
		 window.jQuery || document.write("<script src='<%=path%>/page/back/assets/js/jquery-1.10.2.min.js'>"+"<"+"/script>");
		</script>
		<![endif]-->

		<script type="text/javascript">
			if("ontouchend" in document) document.write("<script src='<%=path%>/page/back/assets/js/jquery.mobile.custom.min.js'>"+"<"+"/script>");
		</script>
		<script src="<%=path%>/page/back/assets/js/bootstrap.min.js"></script>
		<script src="<%=path%>/page/back/assets/js/typeahead-bs2.min.js"></script>

		<!-- page specific plugin scripts -->

		<script src="<%=path%>/page/back/assets/js/jquery.dataTables.min.js"></script>
		<script src="<%=path%>/page/back/assets/js/jquery.dataTables.bootstrap.js"></script>

		<!-- ace scripts -->

		<script src="<%=path%>/page/back/assets/js/ace-elements.min.js"></script>
		<script src="<%=path%>/page/back/assets/js/ace.min.js"></script>

		<!-- inline scripts related to this page -->

		<script type="text/javascript">
			jQuery(function($) {
				var oTable1 = $('#sample-table-2').dataTable( {
				"aoColumns": [
			      { "bSortable": false },
			      null, null,null, null, null,
				  { "bSortable": false }
				] } );
				
				
				$('table th input:checkbox').on('click' , function(){
					var that = this;
					$(this).closest('table').find('tr > td:first-child input:checkbox')
					.each(function(){
						this.checked = that.checked;
						$(this).closest('tr').toggleClass('selected');
					});
						
				});
			
			
				$('[data-rel="tooltip"]').tooltip({placement: tooltip_placement});
				function tooltip_placement(context, source) {
					var $source = $(source);
					var $parent = $source.closest('table');
					var off1 = $parent.offset();
					var w1 = $parent.width();
			
					var off2 = $source.offset();
					var w2 = $source.width();
			
					if( parseInt(off2.left) < parseInt(off1.left) + parseInt(w1 / 2) ) return 'right';
					return 'left';
				}
			});
		</script>
		
</body>
</html>